<%@ include file="/WEB-INF/jsp/include/skin_head.jsp" %><%@ page language="java" pageEncoding="UTF-8"%>
    <div id="pw_bbs_edit">
        <div id="pw_bbs_edit_header"></div>
        <div id="pw_bbs_edit_body">
            <div class="row">
                <label for="userNick"><spring:message code="bbs.userNick"/></label> 
                <span class="pw_padding_w30"><form:input path="userNick" readonly="${ param.command == 'REMOVE' ? true : false}" /></span> <span class=pw_need>*</span>
                <label for="userNick">
                	&nbsp;<form:errors path="userNick" cssClass="pw_need" />
                </label>
            </div>
            <div class="row">
                <label for="userEmail"><spring:message code="bbs.userEmail" /></label> 
                <span class="pw_padding_w30"><form:input path="userEmail" cssStyle="width:240px" readonly="${ param.command == 'REMOVE' ? true : false}" /></span>
                <label for="userEmail">
                	&nbsp;<form:errors path="userEmail" cssClass="pw_need" />
                </label> 
            </div>
            <div class="row">
                <label for="userHomepage"><spring:message code="bbs.userHomepage" /></label> 
                <span class="pw_padding_w16"><form:input path="userHomepage" cssStyle="width:240px" readonly="${ param.command == 'REMOVE' ? true : false}" /></span>
                <label for="userHomepage">
                	&nbsp;<form:errors path="userHomepage" cssClass="pw_need" />
                </label>
            </div>
            <div class="row">
                <label for="title"><spring:message code="bbs.title"/></label>
                <span class="pw_padding_w30">
                    <form:input path="title" cssStyle="width:550px" readonly="${ param.command == 'REMOVE' ? true : false}" />
                </span>
                <span class="pw_need">*</span>
            </div>
       		<form:errors path="title" cssClass="pw_need" />
        </div>
        <div style="width: 718px; z-index: 0; position: relative;" class="WebEditor_box">
            ${webEditor}
	        <form:textarea path="content" cols="75" rows="7" cssClass="WebEditor" readonly="${ param.command == 'REMOVE' ? true : false}" />
	        
            <!-- ${webEditor}
	        <object type="text/html" standby="now loding...">
	        	<iframe id="editor" name="editor" scrolling="auto" style="display: inline; border:0px solid #cccccc; width: 100%; height: 100%;"></iframe>
	        </object-->
	       	<form:errors path="content" cssClass="pw_need" />
        </div>
        <div id="pw_bbs_edit_etc">
            <c:if test="${not empty bbsCategory}">
            <div class="row">
                <img src="<c:url value="/img/skin/default/i_bul.gif"/>" class="pw_bsc" />
                <label for="categorySid"><spring:message code="bbs.category"/></label>
                <span class="pw_padding_w30">
                    <form:select path="categorySid" disabled="${ param.command == 'REMOVE' ? true : false}">
                        <form:option value=""><spring:message code="category.default" /></form:option>
                        <form:options items="${bbsCategory}" />
                    </form:select>
                </span>
                <label for="categorySid">
                	&nbsp;<form:errors path="categorySid" cssClass="pw_need" />
                </label>
            </div>
            </c:if>
            <div class="row">
                <img src="<c:url value="/img/skin/default/i_bul.gif"/>" class="pw_bsc" />
                <label for="userPasswd"><spring:message code="bbs.userPasswd"/></label>
                <span class="pw_padding_w30">
                    <form:password path="userPasswd" maxlength="32" /> <span class=pw_need>*</span>
                </span>
                <label for="userPasswd">
                	&nbsp;<form:errors path="userPasswd" cssClass="pw_need" />
                </label>
            </div>
            <div class="row">
                <img src="<c:url value="/img/skin/default/i_bul.gif"/>" class="pw_bsc" />
                <label for="tagName"><spring:message code="bbs.tag"/></label>
                <span class="pw_padding_w56">
                    <form:input path="tagName" size="33" readonly="${ param.command == 'REMOVE' ? true : false}" /> <form:errors path="tagName" />
                </span>
                <label for="tagName"><spring:message code="bbs.tagDesc"/></label>
            </div>
            <c:if test="${bbsType.manager[user.sid] == param.bbsId}">
            <!-- sec:authorize ifAnyGranted="ROLE_ADMIN,ROLE_SUPER_USER"-->
            <div class="row">
                <img src="<c:url value="/img/skin/default/i_bul.gif"/>" class="pw_bsc" />
                <label for="noticeYn"><spring:message code="bbs.noticeYn"/></label>
                <span class="pw_padding_w13">
                    <form:checkbox path="noticeYn" value="1" disabled="${ param.command == 'REMOVE' ? true : false}" />
                </span>
            </div>
            <!-- /sec:authorize-->
            </c:if>
            <c:if test="${bbsType.secretYn == '1'}">
            <div class="row">
                <img src="<c:url value="/img/skin/default/i_bul.gif"/>" class="pw_bsc" />
                <label for="secretYn"><spring:message code="bbs.secretYn"/></label>
                <span class="pw_padding_w16">
                    <form:checkbox path="secretYn" value="1" disabled="${ param.command == 'REMOVE' ? true : false}" />
                </span>
            </div>
            </c:if>
            <div class="file">
                <img src="<c:url value="/img/skin/default/i_bul.gif"/>" class="pw_bsc" />
                <label for="file[0]"><spring:message code="bbs.attachFile"/></label>
                <span id="pw_uploading"><img src="<c:url value="/img/skin/default/loading.gif"/>" class="pw_bsc" /></span>
                <fieldset id="pw_file_box">
                    <div id="pw_file_disply_items0"><spring:message code="bbs.attachFileDesc"/></div>
                </fieldset>
                <div id="pw_file_box_list">
                    <div id="pw_file_items"></div>
                    <span id="pw_file_item0">
	                    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="100" height="20">
						    <param name="allowScriptAccess" value="sameDomain" />
						    <param name="movie" value="" />
						    <param name="quality" value="high" />
						    <param name="bgcolor" value="#ffffff" />
						    
                            <input id="file0" name="file[0]" type="file" size="30" onchange="attach(this, '0');"  readonly="${param.command == 'REMOVE' ? 'readonly' : ''}" />
                            <!--[if IE]>
                            <object type="application/x-shockwave-flash" width="100" height="20" standby="now loding...">
                                <input id="file0" name="file[0]" type="file" size="30" onchange="attach(this, '0');"  readonly="${param.command == 'REMOVE' ? 'readonly' : ''}" />
                            </object>
                            <![endif]-->
                        </object>
                    </span>
                </div>
            </div>
        </div>
        <div id=pw_btn_action>
            <a href="<c:url value="/bbs/list.do?bbsId="/>${param.bbsId}"><img src="<c:url value="/img/skin/default/btn_list.gif"/>" class="pw_pointer" /></a>
            <img src="<c:url value="/img/skin/default/btn_read_save.gif"/>" class="pw_pointer" onclick="formSubmit('frmBbs', '${param.command}');" />
            <img src="<c:url value="/img/skin/default/btn_overview.gif"/>" class="pw_pointer" />
        </div>
    </div>        
    <div id="progressBar" style="display: none;">
        <div id="progressBarText"></div>
        <div id="progressBarBox">
           <div id="progressBarBoxContent"></div>
        </div>
    </div>
    <c:if test="${param.command == 'REPLY'}">
    <div id="pw_edit_reply">
        <div id="pw_edit_origin">
            <img src="<c:url value="/img/skin/default/i_re.gif"/>" class="pw_bsc" /> <spring:message code="bbs.originThread"/>
        </div>
        <div class="pw_bbs_read_box">
            <div class="title"><spring:message code="bbs.title"/> : ${bbs.title}</div>
            <div class="user">
                <label><spring:message code="bbs.userNick"/></label> 
                ${bbs.userNick}
                <c:if test="${not empty bbs.userEmail}">
                <img src="<c:url value="/img/skin/default/i_email.gif"/>" class="pw_bsc" />
                <span class="email">${bbs.userEmail}</span>
                <span class=pw_eml_red>@</span>
                </c:if>
                <c:if test="${not empty bbs.userHomepage}">
                <img src="<c:url value="/img/skin/default/i_home.gif"/>" class="pw_bsc" /> 
                <span class="homepage">${bbs.userHomepage}</span>
                </c:if>
            </div>
            <div class="regdt"><em>${bbs.registDate} ${bbs.registTime}</em></div>
            <div class="content">
                <pre>${bbs.content}</pre>
            </div>
            <div class="moddt"><em>${bbs.modifyDate} ${bbs.modifyTime}</em></div>
        </div>
    </div>
    </c:if>